
var express = require('express');
var app = express();
 
var config = require('./config');

var server = require('http').createServer(app);
var io = require('socket.io')(server);
var users = require('./common/UserCache.js');

var socketIo = require('./socket/socketIo.js');

app.use(express.static('public'));

server.listen(config.server.port, function () {
    console.log('Server listening at port %d', config.server.port);
});

new socketIo(io, users);





